home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / mac / DirectX SDK / DXSDK / samples / Multimedia / DirectSound / Play3DSound / readme.txt < prev    next >
Text File  |  2001-10-10  |  3KB  |  75 lines

  1. //-----------------------------------------------------------------------------
  2. // 
  3. // Sample Name: Play3DSound Sample
  4. // 
  5. // Copyright (c) 1999-2001 Microsoft Corporation. All rights reserved.
  6. // 
  7. //-----------------------------------------------------------------------------
  8.  
  9.  
  10. Description
  11. ===========
  12.   The Play3DSound sample shows how to create a 3-D sound buffer and 
  13.   manipulate its properties. It is similar to the 3DAudio sample but does not 
  14.   use an audiopath.
  15.  
  16. Path
  17. ====
  18.   Source: DXSDK\Samples\Multimedia\DSound\Play3DSound
  19.  
  20.   Executable: DXSDK\Samples\Multimedia\DSound\Bin
  21.  
  22. User's Guide
  23. ============
  24.   Click Segment File and load a wave, MIDI, or DirectMusic Producer segment 
  25.   file. Play the segment. The position of the sound source is shown as a 
  26.   red dot on the graph, where the x-axis is from left to right and the z-axis 
  27.   is from bottom to top. Change the range of movement on the two axes by using 
  28.   the sliders. 
  29.  
  30.   The listener is located at the center of the graph, and has its default 
  31.   orientation, looking along the positive z-axis; that is, toward the top of 
  32.   the screen. The sound source moves to the listener's left and right and to 
  33.   the listener's front and rear, but does not move above and below the listener.
  34.  
  35.   The sliders in the center of the window control the properties of the 
  36.   listener; that is, the global sound properties. If you click Defer 
  37.   Settings, changes are not applied until you click Apply Settings. 
  38.  
  39. Programming Notes
  40. =================
  41.   For a simpler example of how to setup a DirectSound buffer without a 
  42.   3D positioning, see the PlaySound sample. 
  43.   
  44.   * To create a IDirectSound3DListener interface
  45.         1. Fill out a DSBUFFERDESC struct with 
  46.            DSBCAPS_CTRL3D | DSBCAPS_PRIMARYBUFFER
  47.         2. Call IDirectSound::CreateSoundBuffer passing in the DSBUFFERDESC
  48.            This will create a primary buffer with 3D control.
  49.         3. Call IDirectSoundBuffer::QueryInterface to query for the 
  50.            IDirectSound3DListener
  51.   
  52.   * To create a IDirectSound3DBuffer interface 
  53.         1. Fill out a DSBUFFERDESC struct with 
  54.            DSBCAPS_CTRL3D and the 3D virtualization guid 
  55.         2. Call IDirectSound::CreateSoundBuffer passing in the DSBUFFERDESC
  56.            This will create a secondary buffer with 3D control.
  57.         3. Call IDirectSoundBuffer::QueryInterface to query for the 
  58.            IDirectSound3DBuffer
  59.   
  60.   * Set the position of the listener
  61.         1. Call IDirectSound3DListener::SetAllParameters passing in 
  62.            a DS3DLISTENER struct.  If the DS3D_DEFERRED flag is used,
  63.            then call IDirectSound3DListener::CommitDeferredSettings
  64.            when ready.
  65.         
  66.   * Set the postion of the 3D buffer
  67.         1. Call IDirectSound3DBuffer::SetAllParameters passing in a 
  68.            DS3DBUFFER struct. If the DS3D_DEFERRED flag is used,
  69.            then call IDirectSound3DListener::CommitDeferredSettings
  70.            when ready.
  71.   
  72.   
  73.              
  74.            
  75.